<%@ page language="java" contentType="text/html; charset=utf-8"
         pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
<html>
<head>
    <title>会员添加页面</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="<%=basePath%>css/style.css" rel="stylesheet" type="text/css" />
    <link href="<%=basePath%>css/select.css" rel="stylesheet" type="text/css" />
    <link href="<%=basePath%>css/bootstrap.min.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="<%=basePath%>js/jquery.min.js"></script>
    <script type="text/javascript" src="<%=basePath%>js/select-ui.min.js"></script>
    <script type="text/javascript" src="<%=basePath%>js/rl.js"></script>
    <script type="text/javascript">
        $(function(){
            $('tbody tr:odd').addClass("trLight");
            $(".select-all").click(function(){
                if($(this).attr("checked")){
                    $(".checkBox input[type=checkbox]").each(function(){
                        $(this).attr("checked", true);
                    });
                }else{
                    $(".checkBox input[type=checkbox]").each(function(){
                        $(this).attr("checked", false);
                    });
                }
            });
        });
    </script>
    <style type="text/css">
        body {
            background:#FFF
        }
    </style>
</head>

<body>
<form method="post" action="<%=basePath%>memAddController" method="post" name="ThisForm">
    <div id="contentWrap">
        <!--表格控件 -->
        <div id="widget table-widget">
            <div class="pageTitle">会员添加</div>
            <div class="pageInfo">
                <table>
                    <label id="message">${success}</label>
                    <tr>
                        <td width="20%" align="right">会员名称</td>
                        <td width="20%"><input type="text" id="name" name="name" value=""/></td>
                        <td width="20%" align="right">会员密码</td>
                        <td width="20%"><input type="password" id="password" name="password" value=""/></td>
                    </tr>
                    <tr>
                        <td width="10%" align="right">身份证</td>
                        <td width="50%"><input type="text" id="credit" name="credit"/></td>

                        <td width="20%" align="right">电话</td>
                        <td width="50%"><input type="text" id="tel" name="tel"/></td>
                    </tr>
                    <tr>
                        <td width="10%" align="right">充值金额</td><!-- 编辑时卡余额不能修改 -->
                        <td width="50%"><input type="text" id="moneys" name="balance"/></td>

                        <td width="10%" align="right">充值方式</td>
                        <td width="50%">
                            <select id="type" name="type" >
                                <option value="0">请选择</option>
                                <option value="1">现金</option>
                                <option value="2">微信</option>
                                <option value="3">支付宝</option>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td width="20%" align="right">年龄</td>
                        <td width="20%"><input type="text" id="age" name="age"/></td>
                        <td align="right">性别</td>
                        <td width="20%">
                            <select id="sex" name="sex" >
                                <option value="">请选择</option>
                                <c:if test="${mem.sex=='1'}"> <option value="1" selected>男</option></c:if>
                                <c:if test="${mem.sex!='1'}"> <option value="1" >男</option></c:if>
                                <c:if test="${mem.sex=='0'}"> <option value="0" selected>女</option></c:if>
                                <c:if test="${mem.sex!='0'}"> <option value="0" >女</option></c:if>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td width="20%" align="right">过敏史</td>
                        <td width="20%"><input type="text" id="anaphylaxis" name="anaphylaxis"/></td>
                        <td></td>
                        <td></td>
                    </tr>
                    <tr>
                        <td colspan="4" align="center">
                            <c:if test="${flag!='1'}">
                                <input type="submit" value="确定"/>
                            </c:if>
                            <input type="button"	value="返回" onclick="goback()"/>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
    </div>
</form>
</body>
</html>

